---
title: bud.setPath
description: Set application paths
tags:
  - configuration
  - filesystem
---

You can use **bud.setPath** to set a [bud.path](/reference/bud.path) handle. This documentation probably makes more sense if you've read the [bud.path](/reference/bud.path) documentation.

## Defining new handles

There are only two real rules for defining custom path handles:

- A path handle must be unique
- A path handle must be a `string` which begins with a `@`

To make a reference to the `./src/scripts/components` directory we could write:

```ts
bud.setPath('@components', '@src/scripts/components')
```

In the future we can utilize that reference:

```ts
bud.path('@components') // => './src/scripts/components'
```

## Overriding existing handles

We can redefine the path to source assets like so:

```ts
bud.setPath('@src', 'sources')
```

Lastly, we can define multiple paths (built-in or custom) in a single call by using an object:

```ts
bud.setPath({
  '@src': 'sources',
  '@components': '@src/scripts/components',
})
```

Note that if we were to change `@src` again that `@components` path would still reference the old value. This is something to be aware of.

## Related

- [bud.path](/reference/bud.path)
